'''
Created on Mar 16, 2012

@author: phuongdongbk
'''

import math
def main():
    a = int(raw_input("Nhap a:"))
    b = int(raw_input("Nhap b:"))
    c = int(raw_input("Nhap c:"))
    denta = pow(b,2) - 4*a*c
    if denta == 0:
        print "phuong trinh co 1 nghiem: x = ", -b/(2*a)
    elif denta > 0:
        print "phuong trinh co 2 nghiem x1= ",(-b-math.sqrt(denta))/(2*a), \
        "va x2 = ", (-b+math.sqrt(denta))/(2*a)
    else:
    
        tmp = "%0.4f" %(math.sqrt(-denta)/float(2*a) )
        tmp2 = "%0.4f" %(-b/float(2*a))
    
        
        print "phuong trinh co 2 nghiem ao la: x = {}+-{}i".format(tmp2,tmp)
    
if __name__ == "__main__": main()